﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
using System.Reflection;
using System;

namespace Utility.FSM
{
	public class FSMEvent : UnityEvent<Agent, object>
	{
		public string Name { get; private set; }

		public FSMEvent (string name)
		{
			Name = name;
		}

		public void AddListener (MethodInfo method)
		{
			var del = (UnityAction<Agent, object>)Delegate.CreateDelegate (typeof (UnityAction<Agent, object>), method);
			AddListener (del);
		}

	}
}